package day2.scaladay01

object Method {
  def m1(x:Int, y:Int) :Int = x + y
  def m2(x:Int, y:Int)=println(x+y)
  def m3(x:Int, y:Int) :Int ={
    x + y
  }
  def m4(x:Int, y:Int)={
    println(x+y)
  }

  def main(args: Array[String]): Unit = {
    val result = m1(10, 20)
    println(result)
    m2(20, 30)
    val result2 = m3(106, 20)
    println(result2)
    m4(20000, 30)
  }
}
